<%-- 
    Document   : Test
    Created on : Jun 4, 2014, 3:51:10 AM
    Author     : Yogesh Paisode
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
       <%

            String ipAddress = request.getHeader("X-FORWARDED-FOR");
   if (ipAddress == null) {
	   ipAddress = request.getRemoteAddr();
   }

            out.print(ipAddress);
            %>
    </body>
</html>
